﻿using System;
using System.Windows.Controls;

namespace FazaDemo.PL.Wpf
{
    class ElemBuildWorker : VisualBuildWorker
    {

        private readonly string _name;

        public ElemBuildWorker(string name)
        {
            _name = name;
        }

        protected override void FactoryInit()
        {
            if (_type == typeof(TextBox))
            {
                _factory = new TextBoxFactory(_name);
            }
            if (_type == typeof(ComboBox))
            {
                _factory = new ComboBoxFactory();
            }
        }
    }
}